<!DOCTYPE html>
<html lang="zh-cn">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <title>Upsource使用记录 - macdfree&#39;s blog</title>
  <meta name="renderer" content="webkit" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>

<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />

<meta name="theme-color" content="#f8f5ec" />
<meta name="msapplication-navbutton-color" content="#f8f5ec">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="#f8f5ec">


<meta name="author" content="macd" /><meta name="description" content="Upsource使用记录" />
<meta name="keywords" content="upsource" />



<meta name="baidu-site-verification" content="Ak74Sk61bk" />
<meta name="google-site-verification" content="fAeFHpkrhfFS8LxdzXy0EtAPcVStv0faGn238sRF3L8" />


<meta name="generator" content="Hugo 0.54.0" />


<link rel="canonical" href="/posts/upsource%E4%BD%BF%E7%94%A8%E8%AE%B0%E5%BD%95/" />

<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/manifest.json">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">




<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>


<link href="/dist/even.min.css?v=3.1.1" rel="stylesheet">
<link href="/lib/fancybox/jquery.fancybox-3.1.20.min.css" rel="stylesheet">




<meta property="og:title" content="Upsource使用记录" />
<meta property="og:description" content="Upsource使用记录" />
<meta property="og:type" content="article" />
<meta property="og:url" content="/posts/upsource%E4%BD%BF%E7%94%A8%E8%AE%B0%E5%BD%95/" />
<meta property="article:published_time" content="2018-05-12T12:39:45&#43;08:00"/>
<meta property="article:modified_time" content="2018-05-12T12:39:45&#43;08:00"/>

<meta itemprop="name" content="Upsource使用记录">
<meta itemprop="description" content="Upsource使用记录">


<meta itemprop="datePublished" content="2018-05-12T12:39:45&#43;08:00" />
<meta itemprop="dateModified" content="2018-05-12T12:39:45&#43;08:00" />
<meta itemprop="wordCount" content="1903">



<meta itemprop="keywords" content="upsource," />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Upsource使用记录"/>
<meta name="twitter:description" content="Upsource使用记录"/>

<!--[if lte IE 9]>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/classlist/1.1.20170427/classList.min.js"></script>
<![endif]-->

<!--[if lt IE 9]>
  <script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
<![endif]-->

</head>
<body>
  <div id="mobile-navbar" class="mobile-navbar">
  <div class="mobile-header-logo">
    <a href="/" class="logo">macdfree&#39;s blog</a>
  </div>
  <div class="mobile-navbar-icon">
    <span></span>
    <span></span>
    <span></span>
  </div>
</div>
<nav id="mobile-menu" class="mobile-menu slideout-menu">
  <ul class="mobile-menu-list">
    <a href="/">
        <li class="mobile-menu-item">首页</li>
      </a><a href="/categories/">
        <li class="mobile-menu-item">分类</li>
      </a><a href="/tags/">
        <li class="mobile-menu-item">标签</li>
      </a><a href="/archive/">
        <li class="mobile-menu-item">归档</li>
      </a>
  </ul>
</nav>
  <div class="container" id="mobile-panel">
    <header id="header" class="header">
        <div class="logo-wrapper">
  <a href="/" class="logo">macdfree&#39;s blog</a>
</div>

<nav class="site-navbar">
  <ul id="menu" class="menu">
    <li class="menu-item">
        <a class="menu-item-link" href="/">首页</a>
      </li><li class="menu-item">
        <a class="menu-item-link" href="/categories/">分类</a>
      </li><li class="menu-item">
        <a class="menu-item-link" href="/tags/">标签</a>
      </li><li class="menu-item">
        <a class="menu-item-link" href="/archive/">归档</a>
      </li>
  </ul>
</nav>
    </header>

    <main id="main" class="main">
      <div class="content-wrapper">
        <div id="content" class="content">
          <article class="post">
    
    <header class="post-header">
      <h1 class="post-title">Upsource使用记录</h1>

      <div class="post-meta">
        <span class="post-time"> 2018-05-12 </span>
        <div class="post-category">
          
            <a href="/categories/java/"> java </a>
          
        </div>
        <span class="more-meta"> 约 1903 字 </span>
        <span class="more-meta"> 预计阅读 4 分钟 </span>
        <span id="busuanzi_container_page_pv" class="more-meta"> <span id="busuanzi_value_page_pv"><img src="/img/spinner.svg" alt="spinner.svg"/></span> 次阅读 </span>
      </div>
    </header>

    
    
<div class="post-toc" id="post-toc">
  <h2 class="post-toc-title">文章目录</h2>
  
  <div class="post-toc-content always-active">
    <nav id="TableOfContents">
<ul>
<li><a href="#安装">安装</a>
<ul>
<li><a href="#推荐服务器配置">推荐服务器配置</a></li>
<li><a href="#安装配置">安装配置</a></li>
</ul></li>
<li><a href="#项目管理">项目管理</a></li>
<li><a href="#用户-角色管理">用户/角色管理</a></li>
<li><a href="#代码评审">代码评审</a></li>
</ul>
</nav>
  </div>
</div>

    
    <div class="post-content">
      <p>关于Upsource的安装、配置、使用记录</p>

<h1 id="安装">安装</h1>

<h2 id="推荐服务器配置">推荐服务器配置</h2>

<ul>
<li>8GB及以上内存</li>
<li>64位操作系统</li>
<li>足够的硬盘</li>
</ul>

<h2 id="安装配置">安装配置</h2>

<p>安装包下载地址：<a href="https://www.jetbrains.com/upsource/download">https://www.jetbrains.com/upsource/download</a></p>

<p>将下载好的安装包解压缩到安装目录即完成安装。</p>

<p>在启动前，需要进行一些细微配置：</p>

<ul>
<li>禁用冲突的软件（Windows）</li>
</ul>

<p>如果您在Windows上运行Upsource，请为Upsource根目录禁用所有反病毒，Windows Defender和Windows Search服务，因为它们可能与Upsource进程冲突。</p>

<ul>
<li>调整资源限制（Linux）</li>
</ul>

<p>如果您在Linux上运行Upsource，资源限制不足可能会导致大量错误。
   为了防止这种情况，我们建议设置：</p>

<ul>
<li>最大打开文件数调整为100000</li>
<li>内存锁定和地址空间限制调整为无限制</li>

<li><p>进程数调整为32768</p>

<p>具体配置为在<code>/etc/security/limits.conf</code>文件中添加如下配置：</p></li>
</ul>

<pre><code class="language-conf">* - memlock unlimited
* - nofile 100000
* - nproc 32768
* - as unlimited
</code></pre>

<p>配置完成后，进入<code>&lt;upsource_home&gt;/bin</code>目录，执行<code>upsource.bat start</code>启动Upsource，执行<code>upsource.bat service install /runAsSystem</code>可以将Upsource注册为Windows服务，执行<code>upsource.bat stop</code>停止Upsource。</p>

<p>第一次启动Upsource时会自动打开默认浏览器跳转至欢迎界面</p>

<p><img src="/images/upsourcesetup.png" alt="welcone" /></p>

<p>点击<code>Set up</code>进入设置页面</p>

<p><img src="/images/upsourcesettings.png" alt="settings" /></p>

<p><code>Base URL</code>为Upsource访问地址，可以配置为IP+端口号的形式，如<code>http://192.168.108.68:8880</code>；<code>Application Listen Port</code>为监听端口，需要避免与其他应用冲突。</p>

<p><img src="/images/hubconfig.png" alt="hugconfig" /></p>

<p>默认选择<code>Use Built-in Hub</code>，设置admin账号的密码。</p>

<p><img src="/images/license.png" alt="license" /></p>

<p>默认选择免费授权，支持admin+guest+8users，点击finish完成设置。</p>

<p><img src="/images/starting.png" alt="starting" /></p>

<p>等待一段时间配置完成后自动跳转首页</p>

<p><img src="/images/success.png" alt="success" /></p>

<h1 id="项目管理">项目管理</h1>

<p>用admin账号登录Upsource，按下图操作进行项目新建</p>

<p><img src="/images/admin.png" alt="administration" /></p>

<p><img src="/images/createproject.png" alt="createproject" /></p>

<p><img src="/images/projectinfo.png" alt="projectinfo" /></p>

<ol>
<li>项目名称</li>
<li>项目ID，默认与项目名称相同</li>
<li>代码评审ID，会根据项目名称自动生成</li>
<li>版本控制工具，这里使用SVN</li>
<li>代码仓库地址</li>
<li>认证方法，这里选择用户名密码认证</li>
<li>SVN用户名</li>
<li>SVN密码</li>
<li>可配置多个分支，例如：</li>
</ol>

<pre><code class="language-conf">   +:trunk
   +:branches/*
</code></pre>

<p>表示包含主干和所有分支
10. 检查间隔，300秒表示每个5分钟检查一次SVN是否有新的提交
11. 自动为此项目创建<code>Code Viewers</code>、<code>Developers</code>和<code>Project Admins</code>用户组</p>

<p>设置完成后点击<code>Create project</code>按钮进行项目新增初始化。</p>

<h1 id="用户-角色管理">用户/角色管理</h1>

<p>目前为止，我们只有一个admin账号和一个不需要登录的guest账号。为了代码评审的正常进行需要为开发小组成员新增各自的账号并赋予相应的权限。</p>

<p><img src="/images/upsourceuser.png" alt="user" /></p>

<p><img src="/images/newuser.png" alt="new user" /></p>

<p>如上图所示，填写需要的信息后即可新建用户。建议用户名统一和SVN账号相同，便于代码评审时SVN提交记录和用户对应。</p>

<p>用户新建完成后需要赋予相应的权限。一种简便的方式是通过将用户添加入相应的用户组来进行授权。当新建项目时，默认会在该项目下创建<code>Code Viewers</code>、<code>Developers</code>和<code>Project Admins</code>三个用户组，分别对应此项目的<code>code-viewer</code>、<code>developer</code>和<code>project-admin</code>权限。实际操作中开发小组长同时加入<code>Code Viewers</code>、<code>Developers</code>和<code>Project Admins</code>三个用户组，其他成员加入<code>Code Viewers</code>和<code>Developers</code>用户组。</p>

<p><img src="/images/addtogroup.png" alt="add to group" /></p>

<h1 id="代码评审">代码评审</h1>

<p><img src="/images/projectindex.png" alt="project index" /></p>

<p><img src="/images/projecthome.png" alt="project home" /></p>

<ol>
<li>快捷链接，从左到右依次为：

<ul>
<li>代码浏览，列出工程结构，查看代码</li>
<li>代码审查列表</li>
<li>分支查看，如果有多个分支，可以进行切换查看</li>
<li>可视化分析，包括提交活跃度、代码分布、文件历史、代码审查统计和审查人员关系等</li>
</ul></li>
<li>版本搜索，可以根据作者、提交时间等进行搜索</li>
<li>时间轴，按照时间和分支展示提交记录</li>
<li>展示每次提交的代码改动，并且可以对代码进行备注，提出自己的看法</li>
<li>针对每次提交都可以创建Code Review，或者加入已有的Code Review</li>
<li>展示与自己相关的消息，例如其他对你提交的代码添加了备注并at了你，此处就会展示此消息，并可进行回复</li>
</ol>

<p><img src="/images/codereview.png" alt="code review" /></p>

<ol>
<li>修改<code>Code Review</code>名字，实际操作中一般设置为评审日期</li>
<li>对当前<code>Code Review</code>进行操作，依次为：

<ul>
<li><code>Accept</code>，接受当前Code Review，当与此次Code Review关联的修改都没有问题时点击此按钮</li>
<li><code>Raise concern</code></li>
<li><code>Close review</code>，关闭当前Code Review，当和此次Code Review关联的修改点都修改完毕后可点击此按钮</li>
<li><code>Remove review</code>，删除此次review，一般是删除无用的Code Review</li>
</ul></li>
<li>设置代码审查中的相关人员</li>
<li>与此次Code Review相关的代码修改</li>
<li>针对代码修改提出的备注</li>
</ol>
    </div>

    
    <div class="post-copyright">
  <p class="copyright-item">
    <span class="item-title">文章作者</span>
    <span class="item-content">macd</span>
  </p>
  <p class="copyright-item">
    <span class="item-title">上次更新</span>
    <span class="item-content">2018-05-12</span>
  </p>
  
  
</div>

    
    
<div class="post-reward">
  <input type="checkbox" name="reward" id="reward" hidden />
  <label class="reward-button" for="reward">赞赏支持</label>
  <div class="qr-code">
    
    
      <label class="qr-code-image" for="reward">
        <img class="image" src="/img/reward/wechat-qr-code.png">
        <span>微信打赏</span>
      </label>
    
      <label class="qr-code-image" for="reward">
        <img class="image" src="/img/reward/alipay-qr-code.png">
        <span>支付宝打赏</span>
      </label>
  </div>
</div>

    <footer class="post-footer">
      
        <div class="post-tags">
          
          <a href="/tags/upsource/">upsource</a>
          
        </div>

      
      <nav class="post-nav">
        
          <a class="prev" href="/posts/%E6%A0%B9%E8%AF%81%E4%B9%A6%E7%94%9F%E6%88%90%E5%8F%8A%E7%AD%BE%E5%8F%91%E8%AF%81%E4%B9%A6java%E5%AE%9E%E7%8E%B0/">
            <i class="iconfont icon-left"></i>
            <span class="prev-text nav-default">根证书生成及签发证书Java实现</span>
            <span class="prev-text nav-mobile">上一篇</span>
          </a>
        
          <a class="next" href="/posts/dotnet%E4%B8%ADpasswordderivebytes.cryptderivekey%E7%9A%84java%E5%AE%9E%E7%8E%B0/">
            <span class="next-text nav-default">.NET中PasswordDeriveBytes.CryptDeriveKey的Java实现</span>
            <span class="prev-text nav-mobile">下一篇</span>
            <i class="iconfont icon-right"></i>
          </a>
      </nav>
    </footer>
  </article>
        </div>
        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="social-links">
      <a href="mailto:macdfree@163.com" class="iconfont icon-email" title="email"></a>
      <a href="https://github.com/MACDfree" class="iconfont icon-github" title="github"></a>
  <a href="/index.xml" type="application/rss+xml" class="iconfont icon-rss" title="rss"></a>
</div>

<div class="copyright">
  <span class="power-by">
    由 <a class="hexo-link" href="https://gohugo.io">Hugo</a> 强力驱动
  </span>
  <span class="division">|</span>
  <span class="theme-info">
    主题 - 
    <a class="theme-link" href="https://github.com/olOwOlo/hugo-theme-even">Even</a>
  </span>

  <div class="busuanzi-footer">
    <span id="busuanzi_container_site_pv"> 本站总访问量 <span id="busuanzi_value_site_pv"><img src="/img/spinner.svg" alt="spinner.svg"/></span> 次 </span>
    <span class="division">|</span>
    <span id="busuanzi_container_site_uv"> 本站总访客数 <span id="busuanzi_value_site_uv"><img src="/img/spinner.svg" alt="spinner.svg"/></span> 人 </span>
  </div>

  <span class="copyright-year">
    &copy; 
    
      2014 - 
    2019
    <span class="heart">
      <i class="iconfont icon-heart"></i>
    </span>
    <span class="author">macd</span>
    <span class="division">|</span>
    <span style="margin-left: 5px;">
      <img alt="buildstatus" src="https://travis-ci.org/MACDfree/hugoblog.svg?branch=master">
    </span>
  </span>
</div>
    </footer>

    <div class="back-to-top" id="back-to-top">
      <i class="iconfont icon-up"></i>
    </div>
  </div>
  
<script src="/lib/highlight/highlight.pack.js?v=20171001"></script><script type="text/javascript" src="/lib/jquery/jquery-3.2.1.min.js"></script>
  <script type="text/javascript" src="/lib/slideout/slideout-1.0.1.min.js"></script>
  <script type="text/javascript" src="/lib/fancybox/jquery.fancybox-3.1.20.min.js"></script>
<script type="text/javascript" src="/dist/even.min.js?v=3.1.1"></script>








</body>
</html>
